<template>
  <div class="site-aside-container">
    <template v-if="data">
      <div class="avatar">
        <Avatar :url="data.avatar" :size="170" />
      </div>
      <h1 class="title">{{ data.siteTitle }}</h1>
    </template>
    <div class="menu">
      <Menu />
    </div>
    <Contact v-if="data" />
    <p v-if="data" class="footer">{{ data.icp }}</p>
  </div>
</template>

<script>
import Avatar from "@/components/Avatar";
import Contact from "./Contact";
import Menu from "./Menu";
import { mapState } from "vuex";
export default {
  components: {
    Avatar,
    Contact,
    Menu,
  },
  computed: mapState("setting", ["data"]),
};
</script>

<style scoped lang="less">
@import "~@/styles/var.less";
.site-aside-container {
  width: 100%;
  height: 100%;
  background-color: @dark;
  overflow-x: hidden;
  overflow-y: auto;
  .avatar {
    width: 100%;
    height: 240px;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .footer {
    font-size: 12px;
    text-align: center;
  }
  .menu {
    margin-bottom: 100px;
  }
}
.title {
  font-size: 1em;
  text-align: center;
  color: @white;
}
</style>